<template>
  <page-layout>
    <readonly-form :fields="form.fields" :data="form.data"/>

    <a-card title="学分转换记录" size="small">
      <pro-table :pagination="false"
                 :operate="false"
                 :defaultToolBar="false"
                 :fetch="fetch"
                 :columns="columns"
      />
    </a-card>
  </page-layout>
</template>

<script>
import { reactive } from "vue"
import { page } from "@/api/module/courseBaseInfo"

export default {
  name: "course-corresponding-record-detail",
  setup() {
    const form = reactive({
      fields: [
        {
          title: '项目课程信息',
          fields: [
            { span: 6, title: '项目学校', field: 'schoolCnName' },
            { span: 6, title: '项目课程名称', field: 'courseName' },
            { span: 6, title: '项目名称', field: 'credit' },
            { span: 6, title: '学期', field: 'courseCode' },
          ],
        },
        {
          title: '学生生源课程',
          fields: [
            { span: 6, title: '学生本学校', field: 'schoolCnName' },
            { span: 6, title: '本校课程名称', field: 'courseName' },
          ],
        },
        {
          title: '学生信息',
          fields: [
            { span: 6, title: '学生姓名', field: 'schoolCnName' },
            { span: 6, title: '报名时间', field: 'courseName' },
            { span: 6, title: '课程认证状态', field: 'courseName' },
            { span: 6, title: '学分置换状态', field: 'courseName' },
          ],
        },
      ],
      data: {}
    })

    const columns = [
      { dataIndex: "", key: "", title: "报名课程" },
      { dataIndex: "", key: "", title: "动作" },
      { dataIndex: "", key: "", title: "时间" },
      { dataIndex: "", key: "", title: "操作人" },
      { dataIndex: "", key: "", title: "结果" },
      { dataIndex: "", key: "", title: "说明" },
    ]

    const fetch = async param => {
      const response = await page(param)

      if (response.code === 200) {
        return {
          data: [],
          total: 0
        }
      }
    }

    return {
      form,
      columns,
      fetch
    }
  }
}
</script>
